﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL.LogicComponents;
using BAL.Entities;
using BAL.Utils;
using System.Data;

namespace BAL.Components
{
    public class clsEmployeeBAL
    {
        #region --- Employee Login
        public static bool doAdminLogin(clsEmployee obj)
        {
            bool rs=false;
            try
            {
                switch (clsEmployeeDAL.queryLoginAdmin(obj))
                {
                        case true:
                            rs = true;
                            break;
                        case false:
                            rs = false;
                            break;
                }
                
                return rs;
            }
            catch
            {
                throw;
            }
        }
        
        #endregion

        #region --- New Employee
        public static bool doAddNewEmployee(clsEmployee obj)
        {
            try
            {
                return clsEmployeeDAL.queryAddEmployee(obj);
            }
            catch
            {
                throw;
            }
        }
        #endregion ---

        #region --- Employee Modify Info
        public static bool doUpdateEmployee(clsEmployee obj)
        {
            try
            {
                return clsEmployeeDAL.queryUpdateEmployee(obj);
            }
            catch
            {
                throw;
            }
        }
        #endregion ---

        #region --- Get all Employee
        public static DataTable doEmployeeSelectList()
        {
            try
            {
                return clsEmployeeDAL.queryGetEmployeeList();
            }
            catch
            {
                throw;
            }
        }
        #endregion

        #region --- Get all Employee by id
        public static DataTable doEmployeeSelectListById(clsEmployee obj)
        {
            try
            {
                return clsEmployeeDAL.queryGetEmployeeListById(obj);
            }
            catch
            {
                throw;
            }
        }
        #endregion

        #region --- Upload avatar
        #endregion --- Upload avatar

        #region --- Delete user
        #endregion --- Delete user

        #region --- Delete employee
        #endregion --- Delete emeployee
    }
}